package com.caopeng.achievementmanagement.service;

import com.caopeng.achievementmanagement.mapper.UserMapper;
import com.caopeng.achievementmanagement.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author Crescent_P
 * @date 2021-12-05 9:16
 */
@Service
public class UserServiceImpl implements UserService{

    @Autowired
    private UserMapper userMapper;

    @Override
    public User getByUserNameAndPassword(String userName, String password) {
        return userMapper.getByUserNameAndPassword(userName, password);
    }

    @Override
    public int addUser(User user) {
        return userMapper.insertUser(user);
    }
}
